<script setup lang="ts">
import { ref } from "vue";
import NavAside from "@/components/NavAside.vue";
import NavHeader from "@/components/NavHeader.vue";

const isCollapse = ref(false);

function toggle(): void {
  isCollapse.value = !isCollapse.value;
}
</script>

<template>
  <el-container style="height: 100%;">
    <el-aside
      style="background-color: #545c64"
      :width="isCollapse ? '65px' : '200px'"
    >
      <NavAside :isCollapse="isCollapse"></NavAside>
    </el-aside>
    <el-container>
      <el-header style="padding: 0;">
        <NavHeader :isCollapse="isCollapse" @toggle="toggle"></NavHeader>
      </el-header>
      <el-main style="padding: 0">
        <RouterView></RouterView>
      </el-main>
    </el-container>
  </el-container>
</template>

<style>
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
}
html {
  height: 100%;
}
</style>
